#pragma once

#include "DX11Includes.h"
#include "MeshUtils.h"

struct VertexLayout
{
	D3D11_INPUT_ELEMENT_DESC* Layout;
	UINT NumElements;
};

class InputLayouts
{
public:
	InputLayouts(void);
	~InputLayouts(void);
	static VertexLayout* PositionTextureNormalLayout;
	static VertexLayout* PositionTextureNormalTangentBinormalLayout;
	static VertexLayout* PositionTextureNormalTangentBinormalAnimatedLayout;
	static VertexLayout* PositionTextureLayout;
	static void LoadLayouts();
	static void Unload();
	static VertexLayout* GetVertexLayout(MeshTypeData MdataType) 
	{
		if(MdataType == MeshTypeData::PositionTextureNormal)
		{
			return PositionTextureNormalLayout;
		}
		else if(MdataType == MeshTypeData::PositionTexture)
		{
			return PositionTextureLayout;
		}
		else if(MdataType == MeshTypeData::PositionTextureNormalTangentBinormal)
		{
			return PositionTextureNormalTangentBinormalLayout;
		}
		else if(MdataType == MeshTypeData::PositionTextureNormalTangentBinormalAnimated)
		{
			return PositionTextureNormalTangentBinormalAnimatedLayout;
		}
		else 
		{
			return NULL;
		}
	}
};
